<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,user-scalable=no,maximum-scale=1.0,minimum-scale=1.0" />
<meta content="telephone=no" name="format-detection" />
<link href="<{$res_url}>/css/wap/public.css" rel="stylesheet" type="text/css">
<link href="<{$res_url}>/css/wap/home.css" rel="stylesheet" type="text/css">
<link href="<{$res_url}>/css/wap/can.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="<{$res_url}>/js/wap/jquery.min.js"></script>
<script type="text/javascript" src="<{$res_url}>/js/wap/TouchSlide.1.1.js"></script>
</head>

<body style="background:#F7FBFF;">
	
    <section class="warp">
    	<div class="content">
            <!--<header>
                <div class="search fl"><a href="#"><img src="<{$res_url}>/images/wap/icon1.png" width="20"></a></div>
                <div class="logo"><{$logo}></div>
                <div class="position fr"><a href="#" style="margin-right:10px;"></a></div>
            </header>-->
            <div class="order_payfor" id="tabBox1">
               <div class="order_tab hd">
                   <ul class="clearfix">
                   		<li><a href="javascript:void(0)">全部<span></span></a></li>
                        <li><a href="javascript:void(0)">待付款<span></span></a></li>
						<li><a href="javascript:void(0)">待发货<span></span></a></li>
                        <li><a href="javascript:void(0)">待收货<span></span></a></li>
						<li><a href="javascript:void(0)">待推荐</a></li>
				   </ul>
               </div>
               <div class="order_of bd" id="tabBox1-bd">
                   <!--全部-->
                  <div class="con">
                  <{foreach from=$allorders item=val key=key}>
                   <div class="order_all">
                       <div class="order_title clearfix">
                         <a href="<{link app=b2c ctl=wap_myorders act=ordermsg arg=$val['order_id']}>">
                          <div class="fl">订单号：<{$val['order_id']}></div>
                          <div class="fr"><img src="<{$res_url}>/images/wap/ico13.png"></div>
                         </a>
                       </div>
                       <div class="order_list pit">
                            <ul>
                            <{foreach from=$val['goods_items'] item=goods key=k}>
                               <li>
                                  <div class="fl"><img src="<{$goods['product']['thumbnail_pic_src']}>"></div>
                                  <div class="can fl"><a href="javascript:void(0);"><{$goods['product']['name']}></a></div>
                                  <div class="fun fr"><em>￥<{$goods['product']['price']}></em><p>x<{$goods['product']['quantity']}></p></div>
                               </li>
                            <{/foreach}>
                            </ul>
                            <div class="order_menu clearfix">
                               <div class="fl">运费：<em><{$val['shipping']['cost_shipping']}>元</em></div>
                               <div class="fr">共 <em><{$val['goods_num']}></em> 件 合计：<em>￥<{$val['total_amount']}></em></div>
                            </div>
                            <div class="order_btn">
                                <{if ($val['pay_status'] == '0') && ($val['ship_status'] == '0') && ($val['status'] == 'active')}>
                               <a class="a1" id="<{$val['order_id']}>">取消</a><a class="stn" href="javascript:void(0);">付款</a>

                                <{elseif $val['pay_status'] == '1' && $val['ship_status'] == '0' && $val['status'] == 'active'}>
                                <a class="stn" href="<{link app=b2c ctl=wap_myorders act=exp arg=$val['order_id']}>">查看物流</a><a class="stn" href="javascript:void(0);">确认收货</a>


                                <{elseif $val['pay_status'] == '1' && $val['ship_status'] == '1' && $val['status'] == 'active'}>
                                <a class="stn" href="<{link app=b2c ctl=wap_myorders act=exp arg=$val['order_id']}>">查看物流</a><a class="stn" href="javascript:void(0);">确认收货</a>

                                <{elseif $val['pay_status'] == '1' && $val['ship_status'] == '1' && $val['status'] == 'finish' }>
                                <a class="stn" href="<{link app=b2c ctl=wap_myorders act=exp arg=$val['order_id']}>">查看物流</a>

                                <{elseif $val['status'] == 'dead' || ($val['pay_status'] == '0' && $val['ship_status'] == '0' && $val['status'] == 'finish')}>
                                    <a href="javascript:void(0);">已取消</a>

                                <{/if}>
                            </div>
                        </div> 
                     </div>
                      <{/foreach}>
                  </div>
                   <!--待付款-->
                  <div class="con">
                      <{foreach from=$payorders item=val key=key}>
                      <{if $val['status'] != 'dead' && $val['status'] != 'finish'}>
                      <div class="order_all">
                       <div class="order_title clearfix">
                         <a href="<{link app=b2c ctl=wap_myorders act=ordermsg arg=$val['order_id']}>">
                          <div class="fl">订单号：<{$val['order_id']}></div>
                          <div class="fr"><img src="<{$res_url}>/images/wap/ico13.png"></div>
                         </a>
                       </div>
                       <div class="order_list pit">
                            <ul>
                                <{foreach from=$val['goods_items'] item=goods key=k}>
                               <li>
                                  <div class="fl"><img src="<{$goods['product']['thumbnail_pic_src']}>"></div>
                                  <div class="can fl"><a href="javascript:void(0);"><{$goods['product']['name']}></a></div>
                                  <div class="fun fr"><em>￥<{$goods['product']['price']}></em><p>x<{$goods['product']['quantity']}></p></div>
                               </li>
                                <{/foreach}>
                            </ul>
                            <div class="order_menu clearfix">
                               <div class="fl">运费：<em><{$val['shipping']['cost_shipping']}>元</em></div>
                               <div class="fr">共 <em><{$val['goods_num']}></em> 件 合计：<em>￥<{$val['total_amount']}></em></div>
                            </div>
                            <div class="order_btn">
                                <a class="a1" id="<{$val['order_id']}>">取消</a><a class="stn" href="javascript:void(0);">付款</a>
                            </div>
                        </div>
                     </div>
                      <{/if}>
                    <{/foreach}>
                  </div>
                   <!--待发货-->
                  <div class="con">
                      <{foreach from=$sendorders item=val key=key}>
                      <{if $val['status'] != 'dead' && $val['status'] != 'finish'}>
                      <div class="order_all">
                          <div class="order_title clearfix">
                              <a href="<{link app=b2c ctl=wap_myorders act=ordermsg arg=$val['order_id']}>">
                                  <div class="fl">订单号：<{$val['order_id']}></div>
                                  <div class="fr"><img src="<{$res_url}>/images/wap/ico13.png"></div>
                              </a>
                          </div>
                          <div class="order_list pit">
                              <ul>
                                  <{foreach from=$val['goods_items'] item=goods key=k}>
                                  <li>
                                      <div class="fl"><img src="<{$goods['product']['thumbnail_pic_src']}>"></div>
                                      <div class="can fl"><a href="javascript:void(0);"><{$goods['product']['name']}></a></div>
                                      <div class="fun fr"><em>￥<{$goods['product']['price']}></em><p>x<{$goods['product']['quantity']}></p></div>
                                  </li>
                                  <{/foreach}>
                              </ul>
                              <div class="order_menu clearfix">
                                  <div class="fl">运费：<em><{$val['shipping']['cost_shipping']}>元</em></div>
                                  <div class="fr">共 <em><{$val['goods_num']}></em> 件 合计：<em>￥<{$val['total_amount']}></em></div>
                              </div>
                            <div class="order_btn">
                                <a class="stn" href="<{link app=b2c ctl=wap_myorders act=exp arg=$val['order_id']}>">查看物流</a><a class="stn" href="javascript:void(0);">确认收货</a>

                            </div>
                        </div>
                     </div>
                      <{/if}>
                      <{/foreach}>
                  </div>
                   <!--待收货-->
                  <div class="con">
                      <{foreach from=$colorders item=val key=key}>
                      <{if $val['status'] != 'dead' && $val['status'] != 'finish'}>
                      <div class="order_all">
                          <div class="order_title clearfix">
                              <a href="<{link app=b2c ctl=wap_myorders act=ordermsg arg=$val['order_id']}>">
                                  <div class="fl">订单号：<{$val['order_id']}></div>
                                  <div class="fr"><img src="<{$res_url}>/images/wap/ico13.png"></div>
                              </a>
                          </div>
                          <div class="order_list pit">
                              <ul>
                                  <{foreach from=$val['goods_items'] item=goods key=k}>
                                  <li>
                                      <div class="fl"><img src="<{$goods['product']['thumbnail_pic_src']}>"></div>
                                      <div class="can fl"><a href="javascript:void(0);"><{$goods['product']['name']}></a></div>
                                      <div class="fun fr"><em>￥<{$goods['product']['price']}></em><p>x<{$goods['product']['quantity']}></p></div>
                                  </li>
                                  <{/foreach}>
                              </ul>
                              <div class="order_menu clearfix">
                                  <div class="fl">运费：<em><{$val['shipping']['cost_shipping']}>元</em></div>
                                  <div class="fr">共 <em><{$val['goods_num']}></em> 件 合计：<em>￥<{$val['total_amount']}></em></div>
                              </div>
                            <div class="order_btn">
                                <a class="stn" href="<{link app=b2c ctl=wap_myorders act=exp arg=$val['order_id']}>">查看物流</a><a class="stn" href="javascript:void(0);">确认收货</a>
                            </div>
                        </div>
                     </div>
                      <{/if}>
                      <{/foreach}>
                  </div>
                   <!--待推荐-->
                   <div class="con">
                       <{foreach from=$recorders item=val key=key}>
                       <{if $val['status'] != 'dead'}>
                       <div class="order_all">
                           <div class="order_title clearfix">
                               <a href="<{link app=b2c ctl=wap_myorders act=ordermsg arg=$val['order_id']}>">
                                   <div class="fl">订单号：<{$val['order_id']}></div>
                                   <div class="fr"><img src="<{$res_url}>/images/wap/ico13.png"></div>
                               </a>
                           </div>
                           <div class="order_list pit">
                               <ul>
                                   <{foreach from=$val['goods_items'] item=goods key=k}>
                                   <li>
                                       <div class="fl"><img src="<{$goods['product']['thumbnail_pic_src']}>"></div>
                                       <div class="can fl"><a href="javascript:void(0);"><{$goods['product']['name']}></a></div>
                                       <div class="fun fr"><em>￥<{$goods['product']['price']}></em><p>x<{$goods['product']['quantity']}></p></div>
                                   </li>
                                   <div class="order_btn">
                                       <a href="javascript:void(0);"><img src="<{$res_url}>/images/wap/ico18.png">评价</a><a class="stn" href="<{link app=b2c ctl=wap_amember act=opinions_image}>?order_id=<{$val['order_id']}>&goods_id=<{$goods['product']['goods_id']}>"><img src="<{$res_url}>/images/wap/ico19.png">推荐</a>
                                   </div>
                                   <{/foreach}>
                               </ul>
                               <div class="order_menu clearfix">
                                   <div class="fl">运费：<em><{$val['shipping']['cost_shipping']}>元</em></div>
                                   <div class="fr">共 <em><{$val['goods_num']}></em> 件 合计：<em>￥<{$val['total_amount']}></em></div>
                               </div>
                               <div class="order_btn">
                                   <a class="stn" href="<{link app=b2c ctl=wap_myorders act=exp arg=$val['order_id']}>">查看物流</a>
                               </div>
                           </div>
                       </div>
                       <{/if}>
                       <{/foreach}>
                   </div>
               </div>
            </div>
        </div>
    </section>
    
</body>
<script type="text/javascript">
    TouchSlide( { slideCell:"#tabBox1",

        endFun:function(i){ //高度自适应
            var bd = document.getElementById("tabBox1-bd");
            //bd.parentNode.style.height = bd.children[i].children[0].offsetHeight+"px";
            if(i>0)bd.parentNode.style.transition="200ms";//添加动画效果
        }

    } );
</script>

<script type="text/javascript">
    $('.a1').bind('click',function(){
        var url = '<{$url}>';
        var data = {oid:$(this).attr('id')};
        $.post(url,data,function(msg){
            if(msg.rsp == 'fail'){
                alert('取消失败，请联系客服');
            }else{
                window.location.href = '<{$rurl}>';
            }
        },'json');
    });
</script>
</html>